<!-- 顶部区 -->
<div th:fragment="Top_Menu" class="layui-col-xs12 layui-col-md12" id="top_menu">
	<div class="grid-demo grid-demo-bg1" style="text-align: center;">在线评教系统</div>
	<div style="text-align: right;"><span>欢迎：[[${datas.jobj.realName}]]</span>
	<span style="margin-left: 10px;">账号：[[${datas.jobj.userId}]]</span>
	<span style="margin-left: 10px;" onclick="M.loginOut()">退出</span></div>
</div>


<!-- 左侧菜单区  -->
<div th:fragment="Left_Menu" class="layui-col-xs4 layui-col-md2" id="left_menu">
	<div id="left_menu_top">
		<div class="grid-demo left_menu_item" th:each = "row : ${datas.leftMenu}" th:idd = "${row.Address_url}">[[${row.functionName}]]</div>
	</div>
	
</div>



<!-- 初始化点击功能 -->
<script th:inline="javascript" th:fragment="Init_Click">
	$(document).ready(function() {
		$(".left_menu_item").click(function() {
			$(this).css("background-color","#F5DEB3");
			window.location = $(this).attr("idd");
		});
	});
	var M = {};
	var tab_titles = $(".layui-tab-title li");
	var tab_contents = $(".layui-tab-content .layui-tab-item");
	
	
	M.tab = function(e){
		$(tab_titles).removeAttr("class");
		$(tab_contents).hide();
		sessionStorage.setItem("page",$(e).index());
		$(".layui-tab-title li:eq("+$(e).index()+")").attr("class","layui-this");
		$(".layui-tab-content .layui-tab-item:eq("+$(e).index()+")").show();
	}
	
	M.loginOut = function(){
		var req = {};
		if(String([[${datas.jobj.userId}]]).length > 6){
			req.user = "student";
		}else{
			req.user = "teacher";
		}
		
		Af.rest([[@{loginOut.do}]],req,function(){
			window.location = "login";
		});
	}
	
</script>